Typical physical networks contain several physical routers to perform L3 forwarding (i.e., routing). When a first machine sends a packet to a second machine located on a different IP subnet, the machine sends the packet to a router that uses a destination IP address of the packet to determine through which of its physical interfaces the packet should be sent out. In logical networks, user-defined data compute nodes (e.g., virtual machines) on different subnets also communicate with each other through logical switches and logical routers. A user (e.g., a datacenter network administrator, etc.) defines the logical elements (e.g., logical switches, logical routers) for a logical network topology. For a logical router that connects the logical network to one or more external networks, the user has to manually specify the edge nodes on which the logical routers are configured.